package com.entity;

import java.util.ArrayList;
import java.util.List;

public class AdminExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    private Integer limit;

    private Integer offset;

    public AdminExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    public void setLimit(Integer limit) {
        this.limit = limit;
    }

    public Integer getLimit() {
        return limit;
    }

    public void setOffset(Integer offset) {
        this.offset = offset;
    }

    public Integer getOffset() {
        return offset;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andAdidIsNull() {
            addCriterion("adid is null");
            return (Criteria) this;
        }

        public Criteria andAdidIsNotNull() {
            addCriterion("adid is not null");
            return (Criteria) this;
        }

        public Criteria andAdidEqualTo(String value) {
            addCriterion("adid =", value, "adid");
            return (Criteria) this;
        }

        public Criteria andAdidNotEqualTo(String value) {
            addCriterion("adid <>", value, "adid");
            return (Criteria) this;
        }

        public Criteria andAdidGreaterThan(String value) {
            addCriterion("adid >", value, "adid");
            return (Criteria) this;
        }

        public Criteria andAdidGreaterThanOrEqualTo(String value) {
            addCriterion("adid >=", value, "adid");
            return (Criteria) this;
        }

        public Criteria andAdidLessThan(String value) {
            addCriterion("adid <", value, "adid");
            return (Criteria) this;
        }

        public Criteria andAdidLessThanOrEqualTo(String value) {
            addCriterion("adid <=", value, "adid");
            return (Criteria) this;
        }

        public Criteria andAdidLike(String value) {
            addCriterion("adid like", value, "adid");
            return (Criteria) this;
        }

        public Criteria andAdidNotLike(String value) {
            addCriterion("adid not like", value, "adid");
            return (Criteria) this;
        }

        public Criteria andAdidIn(List<String> values) {
            addCriterion("adid in", values, "adid");
            return (Criteria) this;
        }

        public Criteria andAdidNotIn(List<String> values) {
            addCriterion("adid not in", values, "adid");
            return (Criteria) this;
        }

        public Criteria andAdidBetween(String value1, String value2) {
            addCriterion("adid between", value1, value2, "adid");
            return (Criteria) this;
        }

        public Criteria andAdidNotBetween(String value1, String value2) {
            addCriterion("adid not between", value1, value2, "adid");
            return (Criteria) this;
        }

        public Criteria andAdnameIsNull() {
            addCriterion("adname is null");
            return (Criteria) this;
        }

        public Criteria andAdnameIsNotNull() {
            addCriterion("adname is not null");
            return (Criteria) this;
        }

        public Criteria andAdnameEqualTo(String value) {
            addCriterion("adname =", value, "adname");
            return (Criteria) this;
        }

        public Criteria andAdnameNotEqualTo(String value) {
            addCriterion("adname <>", value, "adname");
            return (Criteria) this;
        }

        public Criteria andAdnameGreaterThan(String value) {
            addCriterion("adname >", value, "adname");
            return (Criteria) this;
        }

        public Criteria andAdnameGreaterThanOrEqualTo(String value) {
            addCriterion("adname >=", value, "adname");
            return (Criteria) this;
        }

        public Criteria andAdnameLessThan(String value) {
            addCriterion("adname <", value, "adname");
            return (Criteria) this;
        }

        public Criteria andAdnameLessThanOrEqualTo(String value) {
            addCriterion("adname <=", value, "adname");
            return (Criteria) this;
        }

        public Criteria andAdnameLike(String value) {
            addCriterion("adname like", value, "adname");
            return (Criteria) this;
        }

        public Criteria andAdnameNotLike(String value) {
            addCriterion("adname not like", value, "adname");
            return (Criteria) this;
        }

        public Criteria andAdnameIn(List<String> values) {
            addCriterion("adname in", values, "adname");
            return (Criteria) this;
        }

        public Criteria andAdnameNotIn(List<String> values) {
            addCriterion("adname not in", values, "adname");
            return (Criteria) this;
        }

        public Criteria andAdnameBetween(String value1, String value2) {
            addCriterion("adname between", value1, value2, "adname");
            return (Criteria) this;
        }

        public Criteria andAdnameNotBetween(String value1, String value2) {
            addCriterion("adname not between", value1, value2, "adname");
            return (Criteria) this;
        }

        public Criteria andAdpwdIsNull() {
            addCriterion("adpwd is null");
            return (Criteria) this;
        }

        public Criteria andAdpwdIsNotNull() {
            addCriterion("adpwd is not null");
            return (Criteria) this;
        }

        public Criteria andAdpwdEqualTo(String value) {
            addCriterion("adpwd =", value, "adpwd");
            return (Criteria) this;
        }

        public Criteria andAdpwdNotEqualTo(String value) {
            addCriterion("adpwd <>", value, "adpwd");
            return (Criteria) this;
        }

        public Criteria andAdpwdGreaterThan(String value) {
            addCriterion("adpwd >", value, "adpwd");
            return (Criteria) this;
        }

        public Criteria andAdpwdGreaterThanOrEqualTo(String value) {
            addCriterion("adpwd >=", value, "adpwd");
            return (Criteria) this;
        }

        public Criteria andAdpwdLessThan(String value) {
            addCriterion("adpwd <", value, "adpwd");
            return (Criteria) this;
        }

        public Criteria andAdpwdLessThanOrEqualTo(String value) {
            addCriterion("adpwd <=", value, "adpwd");
            return (Criteria) this;
        }

        public Criteria andAdpwdLike(String value) {
            addCriterion("adpwd like", value, "adpwd");
            return (Criteria) this;
        }

        public Criteria andAdpwdNotLike(String value) {
            addCriterion("adpwd not like", value, "adpwd");
            return (Criteria) this;
        }

        public Criteria andAdpwdIn(List<String> values) {
            addCriterion("adpwd in", values, "adpwd");
            return (Criteria) this;
        }

        public Criteria andAdpwdNotIn(List<String> values) {
            addCriterion("adpwd not in", values, "adpwd");
            return (Criteria) this;
        }

        public Criteria andAdpwdBetween(String value1, String value2) {
            addCriterion("adpwd between", value1, value2, "adpwd");
            return (Criteria) this;
        }

        public Criteria andAdpwdNotBetween(String value1, String value2) {
            addCriterion("adpwd not between", value1, value2, "adpwd");
            return (Criteria) this;
        }

        public Criteria andAdsaltIsNull() {
            addCriterion("adsalt is null");
            return (Criteria) this;
        }

        public Criteria andAdsaltIsNotNull() {
            addCriterion("adsalt is not null");
            return (Criteria) this;
        }

        public Criteria andAdsaltEqualTo(String value) {
            addCriterion("adsalt =", value, "adsalt");
            return (Criteria) this;
        }

        public Criteria andAdsaltNotEqualTo(String value) {
            addCriterion("adsalt <>", value, "adsalt");
            return (Criteria) this;
        }

        public Criteria andAdsaltGreaterThan(String value) {
            addCriterion("adsalt >", value, "adsalt");
            return (Criteria) this;
        }

        public Criteria andAdsaltGreaterThanOrEqualTo(String value) {
            addCriterion("adsalt >=", value, "adsalt");
            return (Criteria) this;
        }

        public Criteria andAdsaltLessThan(String value) {
            addCriterion("adsalt <", value, "adsalt");
            return (Criteria) this;
        }

        public Criteria andAdsaltLessThanOrEqualTo(String value) {
            addCriterion("adsalt <=", value, "adsalt");
            return (Criteria) this;
        }

        public Criteria andAdsaltLike(String value) {
            addCriterion("adsalt like", value, "adsalt");
            return (Criteria) this;
        }

        public Criteria andAdsaltNotLike(String value) {
            addCriterion("adsalt not like", value, "adsalt");
            return (Criteria) this;
        }

        public Criteria andAdsaltIn(List<String> values) {
            addCriterion("adsalt in", values, "adsalt");
            return (Criteria) this;
        }

        public Criteria andAdsaltNotIn(List<String> values) {
            addCriterion("adsalt not in", values, "adsalt");
            return (Criteria) this;
        }

        public Criteria andAdsaltBetween(String value1, String value2) {
            addCriterion("adsalt between", value1, value2, "adsalt");
            return (Criteria) this;
        }

        public Criteria andAdsaltNotBetween(String value1, String value2) {
            addCriterion("adsalt not between", value1, value2, "adsalt");
            return (Criteria) this;
        }
    }

    /**
     */
    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}